package com.sky.config;

import com.sky.properties.AliOssProperties;
import com.sky.properties.BaiduLoadProperties;
import com.sky.utils.AliOssUtil;
import com.sky.utils.BaiduLoadUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author pm
 * date: 2024/5/18 15:56
 * Description:
 */
@Configuration
@Slf4j
public class BaiduConfiguration {
    @Bean
    public BaiduLoadUtil baiduLoadUtil(BaiduLoadProperties baiduLoadProperties){
        log.info("初始化aliOssUtil对象");
        BaiduLoadUtil baiduLoadUtil = new BaiduLoadUtil(baiduLoadProperties.getAddress(),
                baiduLoadProperties.getAk(),baiduLoadProperties.getOutput(),baiduLoadProperties.getCallback());
        return baiduLoadUtil;
    }
}
